import * as api from '../../utils/api.js';
Page({

  data: {
    serviceList: []
  },
  toSubmitPage: function (e) {
    const serviceId = e.currentTarget.dataset.service_id
    wx.navigateTo({
      url: '/pages/home/maintenanceSubmit?serviceId=' + serviceId,
    })
  },
  maintenanceServiceList() {
    const that = this
    api.maintenanceServiceList()
      .then(res => {
        const serviceList = res.data
        that.setData({
          serviceList
        })
      }).catch(err => console.log(err))
  },
  onLoad(options) {
    this.maintenanceServiceList()
  }

})